#include "ShareMemory.hpp"
#include "Time.hpp"
int main()
{
    shm.CreateShm();
    shm.AttachShm();
    //char* strinfo = (char*)shm.GetAddr();
    struct data* image = (struct data*)shm.GetAddr();
    while(true)
    {
        // printf("%s\n",strinfo);
        printf("status : %s\n",image->status);
        printf("lasttime : %s\n",image->lasttime);
        printf("image : %s\n",image->image);
        strcpy(image->status,"过期");
        sleep(2);
    }
    shm.DetachShm();
    shm.DeleteShm();//由服务端来释放共享内存
    return 0;
}